<?php

include("classes/newsletter.php");

$_class = new newletter();
$idnewslleter = $_GET['id'];
$dados = $_class->pega($idnewslleter);

?>

<div class="titulopaginas">Edi&ccedil;&atilde;o</div>


<form action="acao/newsletter.php?acao=editar" method="post">
<input type="hidden" name="id" value="<?=$dados['id']?>" />
  <p>Nome
    <br />
    <input name="nome" value="<?=$dados["nome"]?>" type="text" class="text-input medium-input datepicker" id="nome" />
    <br>
    </p>
  <p>E-mail<br />
    <input name="email" value="<?=$dados["email"]?>" type="text" class="text-input medium-input datepicker" id="email" />
    <br />
</p>
  <p>Data <br />
    <input name="data" value="<?=$_class->convert_br($dados["data"])?>" type="text" class="text-input small-input datepicker" id="data" />
    <br />
    </p>
  <p>Tipo de e-mail<br />
    <select name="tipo">
      <option <?php if($dados['tipo'] == 1){ echo "selected"; }?> value="1">Cadastrado</option>
      <option <?php if($dados['tipo'] == 0){ echo "selected"; }?> value="0">Visitantes</option>
    </select>
<br />
    <br />
Ativo:
<input type="checkbox" name="ativo" value="1" <?php if($dados['ativo'] == 1){ echo "checked='checked'"; }else{ echo ""; } ?>  id="checkbox" />
<br />
<br>
<input type="submit" class="button" value="Alterar">
  </p>
</form>
